<template>
	<view>
		<view class="ReminderCenterHelp">
			帮助中心
		</view>
		<view class="ReminderCenterNews">
			消息
		</view>
		<view class="ReminderCenterHead">
			<view class="ReminderCenterHeadQuota">
				<image src="../../static/MyQuotaImage.png" style="width: 43rpx;height: 23rpx;margin-right: 13rpx;" mode=""></image>
				<text>优选贷</text>
				<text style="font-size: 22rpx;font-weight: 500;">一键定制高通过率贷款方案</text>
			</view>
			<view style="font-size: 22px;font-weight: 800;color: #444444;margin-top: 50rpx;">
				最高激活可用额度(元)
			</view>
			<view class="ReminderCenterHeadMoney" @click="ReminderCenterClick(1)">
				<text>200000</text>
				<!-- {{website.website}} -->
				<text class="ReminderCenterHeadMoneyInput">马上领钱</text>
			</view>
			<view class="ReminderCenterHeadIntroduce">
				{{website.loan_center_explain}}
			</view>
		</view>
		<view style="margin-top: 37rpx;">
			<view class="ReminderCenterBottom" v-for="(item,index) in list" v-if="index < 3" @click="ListIdClick(item.id)">
				<image :src="item.image" style="width: 84rpx;height: 84rpx;margin: 0 31rpx 0 50rpx;" mode=""></image>
				<view style="display: inline-block;">
					<view class="ReminderCenterBottomHead">
						{{item.name}}
					</view>
					<view class="ReminderCenterBottomBottom">
						您的资质符合放贷初筛，马上补充资料
					</view>
				</view>
				<!-- <text class="ReminderCenterBottomRight">01:01</text> -->
			</view>
	
		</view>
		<view class="ReminderCenterBottomGoldCoin">
			<view class="">
				<image src="../../static/jbbj.png" class="ReminderCenterBottomGoldCoinImg" mode=""></image>
				<text style="font-size: 26rpx;font-weight: 500;color: #000000;margin-left: 17rpx;">{{signs.title}}</text>
				<text style="float: right;">{{signs.time}}</text>
			</view>
			<view style="margin-top: 11rpx;margin-left: 48rpx;">
				{{signs.add_time}}
			</view>
		</view>
	</view>
</template>

<script>
	import {VUE_API_URL} from "@/components/pulugins/index"
	export default {
		components: {
			
		},
		data() {
			return {
				list:'',
				website:'',
				signs:'',			//签到信息
			}
		},
		onShow() {
			this.ReminderCenter();
			this.ApiWebsite();
			this.ApiWebsite2();
			this.PrcductRecommend();
		},
		methods: {
			PrcductRecommend(){
				var that = this
				uni.request({
				    url: VUE_API_URL + 'product/recommend', 
					method:'POST',
				    data: {}, 
				    header: {
				        'Authori-zation': 'Bearer ' + uni.getStorageSync('token') //自定义请求头信息
				    },
				    success: (res) => {
						console.log(res)
				    }
				});
			},
			ApiWebsite(){
				var that = this;
				that.$H.get('/website', {
				}, {
					native: false
				}).then(res => {
					that.website = res.data;
					// console.log(that.website)
				})
			},
			ApiWebsite2(){
				var that = this
				uni.request({
				    url: VUE_API_URL + 'news/list', 
					method:'POST',
				    data: {}, 
				    header: {
				        'Authori-zation': 'Bearer ' + uni.getStorageSync('token') //自定义请求头信息
				    },
				    success: (res) => {
						that.signs = res.data.data.signs;
					},
				})
			},
			ListIdClick(id){
				uni.navigateTo({		//产品详情
					url: '../second/loanPage?id=' + id
				});
			},
			ReminderCenterClick(index){
				if(index == 1){
					uni.navigateTo({		//领取我的额度
						url: '../second/PreferredLoan'
					});
				}
			},
			ReminderCenter(){
				var that = this;
				uni.request({
				    url: VUE_API_URL + 'product/list', 
					method:'POST',
				    data: {}, 
				    header: {
				        'Authori-zation': 'Bearer ' + uni.getStorageSync('token') //自定义请求头信息
				    },
				    success: (res) => {
						var data = res.data.data
						// console.log(data)
						that.list = data.list;
				    }
				});
			}
		},
	}
</script>

<style>
	.ReminderCenterBottom:last-child{
	  border: none;
	}
	.ReminderCenterBottomGoldCoinImg{
		width: 32rpx;
		height: 32rpx;
		position: relative;
		top: 10rpx;
	}
	.ReminderCenterBottomGoldCoin{
		width: 100%;
		height: 130rpx;
		background: #FFFFFF;
		padding: 0 50rpx;
		font-size: 26rpx;
		font-family: PingFang SC;
		font-weight: 300;
		color: #888888;
		padding-top: 28rpx;
		box-sizing: border-box;
		margin-top: 30rpx;
	}
	.ReminderCenterBottomBottom{
		width: 450rpx;
		overflow: hidden;
		text-overflow:ellipsis;
		white-space: nowrap;
	}
	.ReminderCenterBottomRight{
		float: right;
		margin-right: 57rpx;
		position: relative;
		top: 20rpx;
	}
	.ReminderCenterBottomHead{
		font-size: 28rpx;
		font-family: PingFang SC;
		font-weight: bold;
		color: #000000;
		position: relative;
		top: -20rpx;
	}
	.ReminderCenterBottom{
		width: 100%;
		background: #FFFFFF;
		font-size: 26rpx;
		font-family: PingFang SC;
		font-weight: 300;
		color: #000000;
		height: 152rpx;
		border-bottom: 1px solid #E4E4E4;
		padding-top: 36rpx;
		box-sizing: border-box;
	}
	.ReminderCenterHeadIntroduce{
		font-size: 22rpx;
		font-family: PingFang SC;
		font-weight: 800;
		color: #444444;
		margin-top: 33rpx;
	}
	.ReminderCenterHeadMoneyInput{
		display: inline-block;
		font-size: 28rpx;
		font-weight: bold;
		color: #FFFFFF;
		width: 203rpx;
		height: 64rpx;
		background: linear-gradient(-84deg, #DFBA94, #DFAD7B);
		box-shadow: 0px 3rpx 10rpx 0px rgba(0, 0, 0, 0.16);
		border-radius: 32rpx;
		line-height: 64rpx;
		text-align: center;
		float: right;
		position: relative;
		top: 15rpx;
	}
	.ReminderCenterHeadMoney{
		font-size: 66rpx;
		font-family: PingFang SC;
		font-weight: 800;
		color: #000000;
		margin-top: 20rpx;
	}
	.ReminderCenterHeadQuota{
		font-size: 29rpx;
		font-family: PingFang SC;
		font-weight: 800;
		color: #CCB895;
	}
	.ReminderCenterHead{
		font-family: PingFang SC;
		background: #FFFFFF;
		box-shadow: 0px 0px 40rpx 0px rgba(0, 0, 0, 0.1);
		border-radius: 20rpx;
		width: 688rpx;
		margin: 50rpx auto 0 auto;
		padding: 44rpx 43rpx;
		box-sizing: border-box;
	}
	.ReminderCenterNews{
		font-size: 45rpx;
		font-family: PingFang SC;
		font-weight: bold;
		color: #444444;
		padding-top: 40rpx;
		padding-left: 36rpx;
		box-sizing: border-box;
	}
	.ReminderCenterHelp{
		font-size: 28rpx;
		font-family: PingFang SC;
		font-weight: 500;
		color: #444444;
		float: right;
		padding-top: 40rpx;
		padding-right: 44rpx;
		box-sizing: border-box;
	}
	page{
		background: #F8F8F8;
	}
</style>
